import React from 'react';
import styles from './Poker.css';

class Poker extends React.Component {
  constructor(props) {
    super(props);
  }

  handle() {
    if (typeof this.props.data === 'number') {
      return { background: `url(${require(`../../../public/images/${this.props.data}.jpg`)}) no-repeat center`, backgroundSize: '100%' };
    }
  }


  render() {
    return (
      <div className={styles.root}>
        <div className={styles.poker} style={this.handle()} />
      </div>
    );
  }

}

export default Poker;
